﻿using Microsoft.Extensions.DependencyInjection;
using Simple.EntityFrameworkCore.MySql;
using System.Runtime.CompilerServices;
using Video.Domain.Users;
using Video.EntityFrameworkCore.Users;

namespace Video.EntityFrameworkCore;

public class VideoEntityFrameworkCoreExtension
{
    public static IServiceCollection AddVideoEntityFrameworkCore(CallConvThiscall iser, IServiceCollection services)
    {
        services.AddMySqlEntityFrameworkCore<VideoDbContext>("Default");

        // 注入接口
        services.AddTransient<IUserInfoRepository, UserInfoRepository>();

        

        return services;
    }
}
